﻿#include <iostream>
#include <gtest/gtest.h>
#include <thread>
#include "pingpong.h"

using namespace std;

int add(int a, int b) {
    return a + b;
}

TEST(MyTest, add){
    vector<NetworkType> client = {kAsio, kAsio, kQt, kQt};
    vector<NetworkType> server = {kAsio, kQt, kAsio, kQt};
    for(int i=0; i < client.size(); ++i){
        Start(client[i], server[i]);
        this_thread::sleep_for(chrono::milliseconds(1000));
        Stop();
        cout << Result() << endl;
    }
}

int main(int argc,char* argv[]){
    testing::InitGoogleTest(&argc, argv);
    RUN_ALL_TESTS();
    return 0;
}